package com.molyfun.parents.rest.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.molyfun.parents.rest.BaseListResponse;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by william(liuchao.hit@gmail.com).
 * 个人中心积分任务
 */

public class TeamListResponse extends BaseListResponse<TeamListResponse.TeamBean>{

    public static class TeamBean implements Parcelable {

        /**
         * id : 402883e063a9d1880163a9d3d8030000
         * name : 测试小组
         * logo :
         * membercount : 10
         * livestatus : init
         * imgroupid : imidtest
         */

        private String id;
        private String name;
        private String logo;
        private int membercount;//总人数
        private String livestatus;
        private String imgroupid;
        private int type;//1班级
        private String introduction;//班级介绍
        private int number;//可以售卖的课程数
        private int sellcount;//售出数量
        private float price;//价格
        private long begindatetime;//开始时间
        private long enddatetime;//结束时间
        private List<TeacherDetailResponse.TeacherDetailBean> userlist;
        private boolean purchasestatus;//购买状态
        private boolean expire;//表示课程已经到期
        private int rule;//评测状态 0 都没有，1 评估有 2 测评有 3评估和测评都有
        private boolean writestatus;//评测填写状态已填写为true 又有测试题也为true

        private ArrayList<TeamBean> grouplist;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public int getMembercount() {
            return membercount;
        }

        public void setMembercount(int membercount) {
            this.membercount = membercount;
        }

        public String getLivestatus() {
            return livestatus;
        }

        public void setLivestatus(String livestatus) {
            this.livestatus = livestatus;
        }

        public String getImgroupid() {
            return imgroupid;
        }

        public void setImgroupid(String imgroupid) {
            this.imgroupid = imgroupid;
        }

        public List<TeacherDetailResponse.TeacherDetailBean> getUserlist() {
            return userlist;
        }

        public void setUserlist(List<TeacherDetailResponse.TeacherDetailBean> userlist) {
            this.userlist = userlist;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getIntroduction() {
            return introduction;
        }

        public void setIntroduction(String introduction) {
            this.introduction = introduction;
        }

        public int getSellcount() {
            return sellcount;
        }

        public void setSellcount(int sellcount) {
            this.sellcount = sellcount;
        }

        public float getPrice() {
            return price;
        }

        public void setPrice(int price) {
            this.price = price;
        }

        public long getBegindatetime() {
            return begindatetime;
        }

        public void setBegindatetime(long begindatetime) {
            this.begindatetime = begindatetime;
        }

        public long getEnddatetime() {
            return enddatetime;
        }

        public void setEnddatetime(long enddatetime) {
            this.enddatetime = enddatetime;
        }

        public ArrayList<TeamBean> getGrouplist() {
            return grouplist;
        }

        public void setGrouplist(ArrayList<TeamBean> grouplist) {
            this.grouplist = grouplist;
        }

        public boolean isPurchasestatus() {
            return purchasestatus;
        }

        public void setPurchasestatus(boolean purchasestatus) {
            this.purchasestatus = purchasestatus;
        }

        public int getRule() {
            return rule;
        }

        public void setRule(int rule) {
            this.rule = rule;
        }

        public void setPrice(float price) {
            this.price = price;
        }

        public boolean isWritestatus() {
            return writestatus;
        }

        public void setWritestatus(boolean writestatus) {
            this.writestatus = writestatus;
        }

        public int getNumber() {
            return number;
        }

        public void setNumber(int number) {
            this.number = number;
        }

        public boolean isExpire() {
            return expire;
        }

        public void setExpire(boolean expire) {
            this.expire = expire;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.name);
            dest.writeString(this.logo);
            dest.writeInt(this.membercount);
            dest.writeString(this.livestatus);
            dest.writeString(this.imgroupid);
            dest.writeInt(this.type);
            dest.writeString(this.introduction);
            dest.writeInt(this.number);
            dest.writeInt(this.sellcount);
            dest.writeFloat(this.price);
            dest.writeLong(this.begindatetime);
            dest.writeLong(this.enddatetime);
            dest.writeTypedList(this.userlist);
            dest.writeByte(this.purchasestatus ? (byte) 1 : (byte) 0);
            dest.writeByte(this.expire ? (byte) 1 : (byte) 0);
            dest.writeInt(this.rule);
            dest.writeByte(this.writestatus ? (byte) 1 : (byte) 0);
            dest.writeTypedList(this.grouplist);
        }

        public TeamBean() {
        }

        protected TeamBean(Parcel in) {
            this.id = in.readString();
            this.name = in.readString();
            this.logo = in.readString();
            this.membercount = in.readInt();
            this.livestatus = in.readString();
            this.imgroupid = in.readString();
            this.type = in.readInt();
            this.introduction = in.readString();
            this.number = in.readInt();
            this.sellcount = in.readInt();
            this.price = in.readFloat();
            this.begindatetime = in.readLong();
            this.enddatetime = in.readLong();
            this.userlist = in.createTypedArrayList(TeacherDetailResponse.TeacherDetailBean.CREATOR);
            this.purchasestatus = in.readByte() != 0;
            this.expire = in.readByte() != 0;
            this.rule = in.readInt();
            this.writestatus = in.readByte() != 0;
            this.grouplist = in.createTypedArrayList(TeamBean.CREATOR);
        }

        public static final Creator<TeamBean> CREATOR = new Creator<TeamBean>() {
            @Override
            public TeamBean createFromParcel(Parcel source) {
                return new TeamBean(source);
            }

            @Override
            public TeamBean[] newArray(int size) {
                return new TeamBean[size];
            }
        };
    }

}
